package com.wasion.gydpe.dao.impl;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import com.wasion.gydpe.dao.WelcomeDao;
import com.wasion.gydpe.exception.DataAccessException;
import com.wasion.gydpe.model.Resource;

/**
 * 
 * @ClassName: WelcomeDaoImpl
 * @Description: 用户登录数据初始化等数据访问层实现DaoImpl
 * @author 高意
 * @date Sep 25, 2012 10:08:08 AM
 * 
 */
@Repository
public class WelcomeDaoImpl implements WelcomeDao {

	@javax.annotation.Resource
	private SqlSessionTemplate session;

	public List<Resource> queryResources(Map<String, Object> paraMap)
			throws DataAccessException {

		return this.session.selectList("resource.initMenu", paraMap);
	}

	public boolean login(Map<String, Object> paramsMap)
			throws DataAccessException {

		return (Integer) this.session.selectOne("operator.login", paramsMap) > 0;
	}
}
